Skip to content

Feature/userinfo - #273

Open
JasonRobertFrancis wants to merge 21 commits into
mainfrom
feature/userinfo
Open

Feature/userinfo#273
JasonRobertFrancis wants to merge 21 commits into
mainfrom
feature/userinfo

Conversation

@JasonRobertFrancis

Copy link
Copy Markdown
Contributor

No description provided.

@codecov-commenter

codecov-commenter commented Jul 28, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@codecov-commenter

codecov-commenter commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 27.83670% with 6328 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.18%. Comparing base (dd7f02c) to head (fb9579e).

Files with missing lines Patch % Lines
web/Areas/Directory/Services/UserInfoService.cs 41.52% 769 Missing and 38 partials ⚠️
web/Areas/Directory/Views/UserInfo.cshtml 0.00% 386 Missing ⚠️
web/Models/PPS/VwUserinfoUser.cs 0.00% 149 Missing ⚠️
web/Models/PPS/PsJobV.cs 0.00% 125 Missing ⚠️
web/Models/PPS/JobDV.cs 0.00% 121 Missing ⚠️
web/Models/PPS/JpmJpItemDV.cs 0.00% 121 Missing ⚠️
web/Models/PPS/PositionDV.cs 0.00% 118 Missing ⚠️
web/Models/PPS/PsJpmJpItemsV.cs 0.00% 116 Missing ⚠️
web/Models/PPS/EdbperVc.cs 0.00% 104 Missing ⚠️
web/Models/PPS/VwAllJobPosOrg.cs 0.00% 102 Missing ⚠️
... and 195 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #273      +/-   ##
==========================================
+ Coverage   50.07%   56.18%   +6.11%     
==========================================
  Files         998     1193     +195     
  Lines       58354    80337   +21983     
  Branches     5853     6165     +312     
==========================================
+ Hits        29221    45139   +15918     
- Misses      28228    34227    +5999     
- Partials      905      971      +66     
Flag Coverage Δ
backend 56.02% <27.83%> (+6.78%) ⬆️
frontend 58.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

{
var result = System.Text.Json.JsonSerializer.Deserialize<DateTime?>($"\"{input}\"", options);
Assert.NotNull(result);
var nonNullResult = result.Value;
new("scope", "api_access")
};

var formContent = new FormUrlEncodedContent(formParams);
Comment on lines +401 to +407
foreach (var name in nameList)
{
if (!string.IsNullOrEmpty(name.StudentName) && name.ActivityDate.HasValue)
{
names.Add($"{name.StudentName} ({name.ActivityDate:MM/dd/yyyy})");
}
}
Comment on lines +1721 to +1731
foreach (var middlePart in middleParts)
{
if (middlePart.Length > 0)
{
var variation = $"{name} {middlePart[0]}";
if (!nameVariations.Contains(variation))
{
nameVariations.Add(variation);
}
}
}
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Classes/Utilities/IamApi.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment on lines +1325 to +1340
foreach (var history in historyData)
{
var ucpathResult = new UCPathResult
{
JobCode = history.Jobcode,
JobCodeDescription = history.JobcodeDesc,
DepartmentId = history.Deptid,
DepartmentDescription = history.DeptDesc,
ActionDescription = history.ActionDescr,
PositionEffectiveDate = history.PositionEffdt.HasValue ? DateOnly.FromDateTime(history.PositionEffdt.Value) : null,
ReportsTo = GetReportsToName(history),
ReportsToPosition = GetReportsToPosition(history)
};

result.UCPathHistory.Add(ucpathResult);
}
Comment on lines +1643 to +1650
foreach (var groupDn in allGroups)
{
var formattedGroup = AdFormat(groupDn, domains);
if (!string.IsNullOrEmpty(formattedGroup))
{
result.ADMemberOf.Add(formattedGroup);
}
}
Comment on lines +683 to +712
foreach (var perm in permissions)
{
var parts = perm.Split('.');
var partsToProcess = parts.Skip(1).ToList();
if (!partsToProcess.Any())
{
continue;
}

var currentList = roots;
for (int i = 0; i < partsToProcess.Count; i++)
{
var part = partsToProcess[i];
var node = currentList.FirstOrDefault(n => n.Name == part);
if (node == null)
{
node = new PermissionNode
{
Name = part,
FullPath = string.Join('.', parts.Take(i + 2))
};
currentList.Add(node);
}
if (i == partsToProcess.Count - 1)
{
node.IsPermission = true;
}
currentList = node.Children;
}
}

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Classes/Utilities/IamApi.cs Fixed
@rlorenzo

Copy link
Copy Markdown
Contributor

@JasonRobertFrancis You should rebase this off the latest main branch since this doesn't have the GitHub Actions for code quality checks running

Comment on lines +1113 to +1121
foreach (var role in filteredRoles)
{
string displayName = role.DisplayName ?? role.Role;
result.SystemRoles.Add(new SystemRole
{
System = system,
DisplayName = FormatPermissionName(displayName)
});
}
Comment on lines +173 to +176
catch
{
return new List<string>();
}
Comment on lines +231 to +234
catch (Exception ex)
{
Console.WriteLine($"Warning: PopulateDirectoryInfoAsync LDAP failed: {ex.Message}");
}
@rlorenzo

Copy link
Copy Markdown
Contributor

@JasonRobertFrancis #261 just merged to main and conflicts with this branch.

Small scope: one file, web/Areas/Directory/Controllers/DirectoryController.cs, 4 regions. web/Program.cs and web/Viper.csproj auto-merge cleanly.

Both branches reworked the same methods, so every region is "main moved it" vs "your feature changed it in place":

  1. Class-level [Route]: we both replaced the per-action absolute routes with one class-level attribute. The only difference is a leading slash (/[area] vs [area]), which resolves to the same template. Take either.
  2. VMACS lookup (twice, once per search method): main extracts await AddVmacsContactInfoAsync(result); this branch inlines VMACSService.Search(...) and blocks on .Result. Main also turned individuals.ForEach(m => ...) into a foreach, which is what allows the await instead of the blocking call.
  3. Helpers: main added a shared SearchCurrentAaudUsers used by both Get and GetUCD (it clears a CodeQL cs/complex-condition); this branch added PopulateVmacsDetails and an OnActionExecutionAsync override.

The two sides are complementary rather than contradictory: keep main's structure, fold in your PopulateVmacsDetails body and OnActionExecutionAsync, and let the .Result go.

Optional: prompt for a coding agent
Resolve the merge conflict in web/Areas/Directory/Controllers/DirectoryController.cs
between main and feature/userinfo (4 conflict regions). Keep main's structure and
fold the feature work into it:

- Use main's shared SearchCurrentAaudUsers helper for both Get and GetUCD. Do not
  reintroduce the OR chain over identifiers: it trips CodeQL cs/complex-condition.
- Use main's foreach loops with await AddVmacsContactInfoAsync(result). Do not keep
  VMACSService.Search(...).Result; that blocking call only existed because you
  cannot await inside List.ForEach.
- Keep the feature branch's PopulateVmacsDetails body and its OnActionExecutionAsync
  override.
- For the class-level [Route], either form works; match main's "/[area]".

Then verify: npm run test:backend, and
npm run lint web/Areas/Directory/Controllers/DirectoryController.cs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants